// Hash table for 15-puzzle
// Universidad Simon Bolivar, 2008.
// Author: Blai Bonet
// Last Revision: 06/01/11
// Modified by: Fernando Lovera, Simon Rojas.

#ifndef TABLAHASH_H
#define	TABLAHASH_H

#include <iostream>
#include <iomanip>
#include <ext/hash_map>
#include "CasilleroA.h"
#include "CNodo.h"

using namespace std;

namespace __gnu_cxx {

    template<> class hash<CasilleroA> {
    public:

        size_t operator()(const CasilleroA &s) const {
            return *(reinterpret_cast<const unsigned*> (s.getInfo())) ^ *(reinterpret_cast<const unsigned*> ((s.getInfo()) + 4));
        }
    };
};

class hash_A : public __gnu_cxx::hash_map<CasilleroA, CNodo> {
};

#endif	/* TABLAHASH_H */

